<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <link rel="stylesheet" href="./reset.css">
        <style>
            html, body {
                height: 100%;
                overflow: hidden;
            }
            #box{
                position: absolute;
                top: 100px;
                left: 100px;
                width: 150px;
                height: 150px;
                border-radius: 50%;
                background: lightcoral;
                cursor: move;
                z-index: 0;
            }
        </style>
    </head>
    <body>
        <div id="box"></div>
        <script src="./subscrible.js"></script>
        <script src="./index.js"></script>
        <script src="./dragExtend.js"></script>
        <script>
            //原生JS 小技巧:
            //直接写box跟document.getElementById('box')是一样的效果
            let drag = new Drag(box);
            extendDrag(drag);
        </script>
    </body>
</html>